<template>
  <div style="padding: 10px">
    <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
      <el-tab-pane label="均线" name="statisticsA">
        <statisticsA ref="refStatisticsA"></statisticsA>
      </el-tab-pane>
      <el-tab-pane label="统计B" name="statisticsB">
        <statisticsB ref="refStatisticsB"></statisticsB>
      </el-tab-pane>
      <el-tab-pane label="统计C" name="statisticsC">
        <statisticsC ref="refStatisticsC"></statisticsC>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>

import StatisticsA from './statisticsA.vue'
import StatisticsB from './statisticsB.vue'
import StatisticsC from './statisticsC.vue'

export default {
  name: 'StockUpStatistics',
  components: {
    StatisticsA,
    StatisticsB,
    StatisticsC,
  },
  data() {
    return {
      activeName: 'statisticsA'
    }
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab.index)
      console.log(tab, event)
      if ('1' === tab.index) {
        this.$refs.refStatisticsB.getTableMaxHeight()
      }
    }
  }
}
</script>
